package com.sky.service;

import com.sky.dto.OrdersPaymentDTO;
import com.sky.dto.OrdersSubmitDTO;
import com.sky.result.PageResult;
import com.sky.vo.OrderPaymentVO;
import com.sky.vo.OrderSubmitVO;
import com.sky.vo.OrderVO;

public interface OrderService {
    OrderSubmitVO submitOrder(OrdersSubmitDTO ordersSubmitDTO);

    /**
     * 订单支付
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);

    /**
     * 历史订单查询
     * @param pageNum
     * @param pageSize
     * @param status
     * @return
     */
    PageResult pageQueryHistoryOrders(int pageNum, int pageSize, Integer status);

    /**
     * 根据订单id查询订单
     * @param orderId
     * @return
     */
    OrderVO getByOrderId(Long orderId);

    /**
     * 再来一单接口
     * @param id
     */
    void again(Long id);

    /**
     * 取消订单相关接口
     * @param id
     */
    void cancel(Long id);
}
